<!--
  功能：功能描述
  作者：王代彬
  时间：2021年03月19日 14:20:53
  版本：v1.0
-->
<template>
    <div class="home-page">
        <header>
            <el-button
                type="primary"
                v-for="(item, index) in dataList"
                :key="index"
                @click="onChangePage(item)"
                >{{ item.title }}</el-button
            >
        </header>
        <div class="home-view-container">
            <router-view></router-view>
        </div>
    </div>
</template>

<script>
export default {
    name: "demo",
    props: {},
    components: {},
    data() {
        return {
            dataList: [
                {
                    title: "管理界面",
                    url: "home-manage",
                },
                {
                    title: "展示界面",
                    url: "home-display",
                }
            ],
        };
    },
    filters: {},
    computed: {},
    watch: {},
    methods: {
        onChangePage(item) {
            this.$router.push({
                path: `/${item.url}`,
            });
        },
    },
    created() {},
    mounted() {},
};
</script> 

<style lang='less' scoped>
@import "./index.less";
</style>
